/**
 * Copyright (c) 2012 Nokia Corporation.
 */

#ifndef GEOPERMISSIONHANDLER_H
#define GEOPERMISSIONHANDLER_H

#include <QObject>
#include <QWebFrame>
#include <QWebPage>

#include "qdeclarativewebview_p.h"


class GeoPermissionHandler : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QDeclarativeWebView* view READ view WRITE setView)

public:
    explicit GeoPermissionHandler(QObject *parent = 0);
    ~GeoPermissionHandler();

public:
    QDeclarativeWebView *view() const;
    void setView(QDeclarativeWebView *view);

#ifndef Q_WS_SIMULATOR
public slots:
    void handlePermissionRequest(QWebFrame *frame, QWebPage::Feature feature);
#endif

private: // Data
    QDeclarativeWebView *m_webView; // Not owned
};

#endif // GEOPERMISSIONHANDLER_H
